<!DOCTYPE html>
<html lang="en">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title>任务信息</title>
 		      <script type="text/javascript"   th:src="@{/js/jquery.min.js}"></script>

<script  th:inline="javascript">
    
    	var taskId = [[${taskId}]];
    	
    </script>
</head>
<body>
   
   	<div id="haveOrNo">
		
			<p>没有待执行任务</p>
		</div>
   
   <div id="xs">

		   		<p>任务单</p>
		   	
		   		<p>请假单ID:</p><input type="text" id="id" name="id"/> 
		   		<p>状态:</p><input type="text" id="status" /> 
		   		<p>备注:</p><input type="text" id="leaveMsg" /> 
		   		<p>请假天数:</p><input type="text" id="days" /> 
		   		<p>任务单ID:</p><input type="text" id="taskId" /> 
		   		<p>用户ID:</p><input type="text" id="userId" /> 
		   		
		   		
		   		<a id="sp" href="/workflow/audit?taskId=">审批</a>
		   	
  		</div>
  		
  		
  		
  		
  		<script  th:inline="javascript">
    	var id = [[${id}]];
    	var leaveMsg = [[${leaveMsg}]];
    	var days = [[${days}]];
    	var status = [[${status}]];
    	var userId = [[${userId}]];
    	var taskId = [[${taskId}]];
    	console.log(id);
    	
    	$("#id").attr("value", id);
    	$("#userId").val(userId);
    	$("#days").val(days);
    	$("#status").val(status);
    	$("#leaveMsg").val(leaveMsg);
    	$("#taskId").val(taskId);
    	
    	
    	 function dianji(){
    		 $("#tj").show();
    		 $("#xs").hide();
    		 
    		
     	}
    	
    	//页面加载后先隐藏提交div
    	 $(function () { 
    		 if(taskId != null){
    			 $("#haveOrNo").hide();
    		 }else{
    			 $("#xs").hide(); 
    		 }
    		 
    		 $('#sp').attr('href','/workflow/audit?taskId='+taskId);
    	 });
    </script>
</body>

</html>